home *** CD-ROM | disk | FTP | other *** search
- '\"
- '\" Copyright (c) 1993 The Regents of the University of California.
- '\" Copyright (c) 1994-1995 Sun Microsystems, Inc.
- '\"
- '\" See the file "license.terms" for information on usage and redistribution
- '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '\"
- '\" @(#) lindex.n 1.4 95/01/30 10:32:28
- '\"
- .so man.macros
- .HS lindex tcl 7.4
- .BS
- '\" Note: do not modify the .SH NAME line immediately below!
- .SH NAME
- lindex \- Retrieve an element from a list
- .SH SYNOPSIS
- \fBlindex \fIlist index\fR
- .BE
-
- .SH DESCRIPTION
- .PP
- This command treats \fIlist\fR as a Tcl list and returns the
- \fIindex\fR'th element from it (0 refers to the first element of the list).
- In extracting the element, \fIlindex\fR observes the same rules
- concerning braces and quotes and backslashes as the Tcl command
- interpreter; however, variable
- substitution and command substitution do not occur.
- If \fIindex\fR is negative or greater than or equal to the number
- of elements in \fIvalue\fR, then an empty
- string is returned.
- .VS
- If \fIindex\fR has the value \fBend\fR, it refers to the last element
- in the list.
- .VE
-
- .SH KEYWORDS
- element, index, list
-